Post

Replies

Boosts

Views

Activity

Comment on Swift Array removeAll() performance (slow)
We've been working on putting 20000 ViewControllers into an Array. We've seen that putting 20000 into an Array using append() doesn't take much time. However, it took a long time when I called removeAll() to delete the previously inserted 20000. It took about 15-20 seconds between calling removeAll and completing all append . We've even seen that using [] instead of removeAll() is time consuming which doesn't make much difference.
Mar ’22